class Example {
   static void  test(){
      def a="ms-flask-admin"
      def to_list = a.split("-")
      def project=to_list[0]
      def service = ""
      for(int i=1;i<to_list.size();i++){
         if(i==to_list.size()-1){
            service= service.concat(to_list[i])
         }else{
            service= service.concat(to_list[i]).concat("-")
         }
         println("service is $service")
      }

      println("project is $project")
      println("service is $service")

   }
   static void main(String[] args) {
      // Using a simple println statement to print output to the console
      println('Hello World');
      test()

   }
}


